package #(package);

import lombok.Data;
import pub.cleangao.mybatis.annotation.*;

import java.io.Serializable;
#if(tableInfo.hasDateType)
import java.util.Date;
#end
#if(tableInfo.hasBigDecimalType)
import java.math.BigDecimal;
#end



/**
 * #(comment)
 *
 * @author #(author)
 * @since #(datetime)
 */
@Data
@Database(dialect = Dialect.#(dbDialect))
@Table(value = "#(tableInfo.tableName)")
public class #(className) implements Serializable {

    #for(columnInfo : tableInfo.javaColumnInfos)
    /**
     * #(columnInfo.comment)
     */
    #if(columnInfo.isPk)
    #if(columnInfo.isIdentity)
    @PrimaryKey(strategy = PkGenerate.AUTO)
    #else
    @PrimaryKey(strategy = PkGenerate.MANUAL)
    #end
    #else
    @Column(value = "#(columnInfo.columnName)")
    #end
    #(entityFieldOpening) #(columnInfo.javaTypeBox) #(columnInfo.javaFieldName);

    #end

}
